﻿<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:Avanade="urn:Avanade" xmlns:rs='urn:schemas-microsoft-com:rowset' xmlns:z='#RowsetSchema'>
  <xsl:template match="/">
    <input type="hidden" name="selectedButton" value="" />
    <xsl:choose>
      <!-- Titre et chapeau -->
      <xsl:when test="//DisplayStyle = '0'">
        <table width="100%" border="0" cellspacing="0" cellpadding="0" summary="Webpart ANNONCE">
          <tr>
            <td style="padding:10px">
              <xsl:for-each select="xml/rs:data/z:row">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td>
                      <br />
                      <span style="text-transform:uppercase;color:#4f4f4f;font-weight:bold">
                        <xsl:value-of select="current()/@ows_Surtitre" />
                      </span>
                      <br />
                      <xsl:choose>
                        <xsl:when test="normalize-space(Avanade:FormatLink(current()/@ows_Lien_x0020_vers_x0020_autre_x002)) != ''">
                          <a style="font-size:11px;font-weight:bold">
                              <xsl:attribute name="href">
                                <xsl:value-of select="Avanade:FormatLink(current()/@ows_Lien_x0020_vers_x0020_autre_x002)" />
                              </xsl:attribute>
                            <span style="color:#F21E8C">
                              <xsl:value-of select="current()/@ows_Title" />
                            </span>
                          </a>
                        </xsl:when>
                        <xsl:when test="normalize-space(//BaseUrl) != ''">
                          <a style="font-size:11px;font-weight:bold">
                              <xsl:attribute name="href">
                                <xsl:value-of select="//BaseUrl" />
                                <xsl:value-of select="current()/@ows_ID" />
                              </xsl:attribute>
                            <span style="color:#F21E8C">
                              <xsl:value-of select="current()/@ows_Title" />
                            </span>
                          </a>
                        </xsl:when>
                        <xsl:otherwise>
                          <span style="font-size:11px;font-weight:bold;color:#F21E8C">
                            <xsl:value-of select="current()/@ows_Title" />
                          </span>
                        </xsl:otherwise>
                      </xsl:choose>
                      <span style="color:gray;font-size:8px;font-weight:bold">
                        (<xsl:value-of select="Avanade:FormatDate(current()/@ows_Created)" />)
                      </span>
                      <br/>
                      <br/>
                      <div style="clear:both;vertical-align:top">
                        <xsl:if test="normalize-space(translate(current()/@ows_Photo, ',', '')) != ''">
                          <div style="float:left;padding-right:10px">
                            <img style="border: solid 1px #fce4ee;">
                              <xsl:attribute name="src">
                                <xsl:value-of select="Avanade:FormatLink(current()/@ows_Photo)" />
                              </xsl:attribute>
                            </img>
                          </div>
                        </xsl:if>
                          <div>
                            <xsl:value-of select="Avanade:FormatBody(current()/@ows_Chapeau)" />
                          </div>
                        <xsl:if test="normalize-space(translate(current()/@ows_Compl_x00e9_ment_x0020_info, ',', '')) != ''">
							<p>
								<xsl:value-of select="Avanade:FormatBody(current()/@ows_Compl_x00e9_ment_x0020_info)" />
							</p>
                        </xsl:if>
                      </div>
                    </td>
                  </tr>
                  <tr>
                    <td style="height:1px;background-color:#fce4ee;"></td>
                  </tr>
                </table>
              </xsl:for-each>
            </td>
          </tr>
          <xsl:if test="normalize-space(//NewFormURL) != ''">
            <tr>
              <td class="ms-addnew">
                <![CDATA[<img alt="" src="_layouts/images/rect.gif" />&nbsp;<a class="ms-addnew" href="]]><xsl:value-of select="//NewFormURL" /><![CDATA[">Ajouter une nouvelle annonce</a>]]>
              </td>
            </tr>
          </xsl:if>
          <xsl:if test="normalize-space(//ListURL) != '' and count(xml/rs:data/z:row) > 1 and /xml/PageName = '/Pages/Echos.aspx'">
            <tr>
              <td class="ms-addnew" colspan="2">
                <![CDATA[<img alt="" src="_layouts/images/rect.gif" />&nbsp;<a class="ms-addnew" href="]]><xsl:value-of select="//ListURL" /><![CDATA[">Plus de news</a>]]>
              </td>
            </tr>
          </xsl:if>
          <!--<xsl:if test="normalize-space(//AllowPaging) = 'True'">
            <tr>
              <td class="ms-addnew" style="text-align:center">
                <![CDATA[<input type="image" name="First" onclick="document.getElementById('selectedButton').value = this.name;this.form.submit();" alt="Première page" src="_layouts/images/ewr18.gif" />
                         <input type="image" name="Previous" onclick="document.getElementById('selectedButton').value = this.name;this.form.submit();" alt="Page précédente" src="_layouts/images/ewr19.gif" />&nbsp;
                         <input type="image" name="Next" onclick="document.getElementById('selectedButton').value = this.name;this.form.submit();" alt="Page suivante" src="_layouts/images/ewr20.gif" />
                         <input type="image" name="Last" onclick="document.getElementById('selectedButton').value = this.name;this.form.submit();" alt="Dernière page" src="_layouts/images/ewr21.gif" />]]>
              </td>
            </tr>
          </xsl:if>-->
        </table>
      </xsl:when>
      <!-- Titre et chapeau (Sans date) -->
      <xsl:when test="//DisplayStyle = '1'">
        <table width="100%" border="0" cellspacing="0" cellpadding="0" summary="Webpart ANNONCE">
          <tr>
            <td>
              <xsl:for-each select="xml/rs:data/z:row">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td style="padding:10px">
                      <br />
                      <span style="text-transform:uppercase;color:#4f4f4f;font-weight:bold">
                        <xsl:value-of select="current()/@ows_Surtitre" />
                      </span>
                      <br />
                      <xsl:choose>
                        <xsl:when test="normalize-space(Avanade:FormatLink(current()/@ows_Lien_x0020_vers_x0020_autre_x002)) != ''">
                          <a style="font-size:11px;font-weight:bold">
                              <xsl:attribute name="href">
                                <xsl:value-of select="Avanade:FormatLink(current()/@ows_Lien_x0020_vers_x0020_autre_x002)" />
                              </xsl:attribute>
                            <span style="color:#F21E8C">
                              <xsl:value-of select="current()/@ows_Title" />
                            </span>
                          </a>
                        </xsl:when>
                        <xsl:when test="normalize-space(//BaseUrl) != ''">
                          <a style="font-size:11px;font-weight:bold">
                            <xsl:attribute name="href">
                              <xsl:value-of select="//BaseUrl" />
                              <xsl:value-of select="current()/@ows_ID" />
                            </xsl:attribute>
                            <span style="color:#F21E8C">
                              <xsl:value-of select="current()/@ows_Title" />
                            </span>
                          </a>
                        </xsl:when>
                        <xsl:otherwise>
                          <span style="font-size:11px;font-weight:bold;color:#F21E8C">
                            <xsl:value-of select="current()/@ows_Title" />
                          </span>
                        </xsl:otherwise>
                      </xsl:choose>
                      <br/>
                      <br/>
                      <div style="clear:both;vertical-align:top">
                        <xsl:if test="normalize-space(translate(current()/@ows_Photo, ',', '')) != ''">
                          <div style="float:left;padding-right:10px">
                            <img style="border: solid 1px #fce4ee;">
                              <xsl:attribute name="src">
                                <xsl:value-of select="Avanade:FormatLink(current()/@ows_Photo)" />
                              </xsl:attribute>
                            </img>
                          </div>
                        </xsl:if>
                          <div>
                            <xsl:value-of select="Avanade:FormatBody(current()/@ows_Chapeau)" />
                          </div>
                      </div>
                    </td>
                  </tr>
                  <tr>
                    <td style="height:1px;background-color:#fce4ee;"></td>
                  </tr>
                </table>
              </xsl:for-each>
            </td>
          </tr>
          <xsl:if test="normalize-space(//NewFormURL) != ''">
            <tr>
              <td class="ms-addnew">
                <![CDATA[<img alt="" src="_layouts/images/rect.gif" />&nbsp;<a class="ms-addnew" href="]]><xsl:value-of select="//NewFormURL" /><![CDATA[">Ajouter une nouvelle annonce</a>]]>
              </td>
            </tr>
          </xsl:if>
        </table>
      </xsl:when>
      <!-- Titre et Surtitre -->
      <xsl:when test="//DisplayStyle = '2'">
        <table width="100%" border="0" cellspacing="0" cellpadding="0" summary="Webpart ANNONCE">
          <tr>
            <td style="background-color:#ffffff;width:100%;vertical-align:top;height:0%;padding-top:10px;padding-right:10px;font-size:10px">
              <ul>
                <xsl:for-each select="xml/rs:data/z:row">
                  <li type="square" style="color:#4f4f4f">
                    <span style="text-transform:uppercase;color:#4f4f4f;font-weight:bold">
                      <xsl:value-of select="current()/@ows_Surtitre" />
                    </span>
                    <br />
                      <xsl:choose>
                        <xsl:when test="normalize-space(Avanade:FormatLink(current()/@ows_Lien_x0020_vers_x0020_autre_x002)) != ''">
                          <a style="font-size:11px;font-weight:bold">
                              <xsl:attribute name="href">
                                <xsl:value-of select="Avanade:FormatLink(current()/@ows_Lien_x0020_vers_x0020_autre_x002)" />
                              </xsl:attribute>
                            <span style="color:#F21E8C">
                              <xsl:value-of select="current()/@ows_Title" />
                            </span>
                          </a>
                        </xsl:when>
                        <xsl:when test="normalize-space(//BaseUrl) != ''">
                          <a style="font-size:11px;font-weight:bold">
                            <xsl:attribute name="href">
                              <xsl:value-of select="//BaseUrl" />
                              <xsl:value-of select="current()/@ows_ID" />
                            </xsl:attribute>
                            <span style="color:#F21E8C">
                              <xsl:value-of select="current()/@ows_Title" />
                            </span>
                          </a>
                        </xsl:when>
                        <xsl:otherwise>
                          <span style="font-size:11px;font-weight:bold;color:#F21E8C">
                            <xsl:value-of select="current()/@ows_Title" />
                          </span>
                        </xsl:otherwise>
                      </xsl:choose>
                    <span style="color:gray;font-size:8px;font-weight:bold">
                      (<xsl:value-of select="Avanade:FormatDate(current()/@ows_Created)" />)
                    </span>
                    <br />
                  </li>
                  <br />
                </xsl:for-each>
              </ul>
            </td>
          </tr>
          <xsl:if test="normalize-space(//NewFormURL) != ''">
            <tr>
              <td class="ms-addnew">
                <![CDATA[<img alt="" src="_layouts/images/rect.gif" />&nbsp;<a class="ms-addnew" href="]]><xsl:value-of select="//NewFormURL" /><![CDATA[">Ajouter une nouvelle annonce</a>]]>
              </td>
            </tr>
          </xsl:if>
        </table>
      </xsl:when>
      <!-- Titre et Surtitre (Sans date) -->
      <xsl:when test="//DisplayStyle = '3'">
        <table width="100%" border="0" cellspacing="0" cellpadding="0" summary="Webpart ANNONCE">
          <tr>
            <td style="background-color:#ffffff;width:100%;vertical-align:top;height:0%;padding-top:10px;padding-right:10px;font-size:10px">
              <ul>
                <xsl:for-each select="xml/rs:data/z:row">
                  <li type="square" style="color:#4f4f4f">
                    <span style="text-transform:uppercase;color:#4f4f4f;font-weight:bold">
                      <xsl:value-of select="current()/@ows_Surtitre" />
                    </span>
                    <br />
					<xsl:if test="current()/@ows_Non_x0020_cliquable = 'Oui'">
                      <span style="font-size:11px; font-weight:bold; color:#F21E8C">
                        <xsl:value-of select="current()/@ows_Title" />
                      </span>
					</xsl:if>
					<xsl:if test="not(current()/@ows_Non_x0020_cliquable = 'Oui')">
                      <xsl:choose>
                        <xsl:when test="normalize-space(Avanade:FormatLink(current()/@ows_Lien_x0020_vers_x0020_autre_x002)) != ''">
                          <a style="font-size:11px;font-weight:bold">
                              <xsl:attribute name="href">
                                <xsl:value-of select="Avanade:FormatLink(current()/@ows_Lien_x0020_vers_x0020_autre_x002)" />
                              </xsl:attribute>
                            <span style="color:#F21E8C">
                              <xsl:value-of select="current()/@ows_Title" />
                            </span>
                          </a>
                        </xsl:when>
                        <xsl:when test="normalize-space(//BaseUrl) != ''">
                          <a style="font-size:11px;font-weight:bold">
                            <xsl:attribute name="href">
                              <xsl:value-of select="//BaseUrl" />
                              <xsl:value-of select="current()/@ows_ID" />
                            </xsl:attribute>
                            <span style="color:#F21E8C">
                              <xsl:value-of select="current()/@ows_Title" />
                            </span>
                          </a>
                        </xsl:when>
                        <xsl:otherwise>
                          <span style="font-size:11px;font-weight:bold;color:#F21E8C">
                            <xsl:value-of select="current()/@ows_Title" />
                          </span>
                        </xsl:otherwise>
                      </xsl:choose>
					</xsl:if>
                    <br />
                  </li>
                  <br />
                </xsl:for-each>
              </ul>
            </td>
          </tr>
          <xsl:if test="normalize-space(//NewFormURL) != ''">
            <tr>
              <td class="ms-addnew">
                <![CDATA[<img alt="" src="_layouts/images/rect.gif" />&nbsp;<a class="ms-addnew" href="]]><xsl:value-of select="//NewFormURL" /><![CDATA[">Ajouter une nouvelle annonce</a>]]>
              </td>
            </tr>
          </xsl:if>
        </table>
      </xsl:when>
      <!-- Titre et corps -->
      <xsl:when test="//DisplayStyle = '4'">
        <table width="100%" border="0" cellspacing="0" cellpadding="0" summary="Webpart VIDEO">
          <tr>
            <td style="padding:10px">
              <xsl:for-each select="xml/rs:data/z:row">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td>
                      <br />
                      <span style="text-transform:uppercase;color:#4f4f4f;font-weight:bold">
                        <xsl:value-of select="current()/@ows_Surtitre" />
                      </span>
                      <br />
                      <xsl:choose>
                        <xsl:when test="normalize-space(Avanade:FormatLink(current()/@ows_Lien_x0020_vers_x0020_autre_x002)) != ''">
                          <a style="font-size:11px;font-weight:bold">
                              <xsl:attribute name="href">
                                <xsl:value-of select="Avanade:FormatLink(current()/@ows_Lien_x0020_vers_x0020_autre_x002)" />
                              </xsl:attribute>
                            <span style="color:#F21E8C">
                              <xsl:value-of select="current()/@ows_Title" />
                            </span>
                          </a>
                        </xsl:when>
                        <xsl:when test="normalize-space(//BaseUrl) != ''">
                          <a style="font-size:11px;font-weight:bold">
                            <xsl:attribute name="href">
                              <xsl:value-of select="//BaseUrl" />
                              <xsl:value-of select="current()/@ows_ID" />
                            </xsl:attribute>
                            <span style="color:#F21E8C">
                              <xsl:value-of select="current()/@ows_Title" />
                            </span>
                          </a>
                        </xsl:when>
                        <xsl:otherwise>
                          <span style="font-size:11px;font-weight:bold;color:#F21E8C">
                            <xsl:value-of select="current()/@ows_Title" />
                          </span>
                        </xsl:otherwise>
                      </xsl:choose>
                      <span style="color:gray;font-size:8px;font-weight:bold">
                        (<xsl:value-of select="Avanade:FormatDate(current()/@ows_Created)" />)
                      </span>
                      <br/>
                      <br/>
                      <div style="clear:both;vertical-align:top">
                        <xsl:if test="normalize-space(translate(current()/@ows_Photo, ',', '')) != ''">
                          <div style="float:left;padding-right:10px">
                            <a>
                              <xsl:if test="normalize-space(//BaseUrl) != ''">
                                <xsl:attribute name="href">
                                  <xsl:value-of select="//BaseUrl" />
                                  <xsl:value-of select="current()/@ows_ID" />
                                </xsl:attribute>
                              </xsl:if>
                              <img style="border:solid 1px #fce4ee;">
                                <xsl:attribute name="src">
                                  <xsl:value-of select="Avanade:FormatLink(current()/@ows_Photo)" />
                                </xsl:attribute>
                              </img>
                            </a>
                          </div>
                        </xsl:if>
                          <div>
                            <xsl:value-of select="current()/@ows_Body" />
                          </div>
                      </div>
                    </td>
                  </tr>
                  <tr>
                    <td style="height:1px;background-color:#fce4ee;"></td>
                  </tr>
                </table>
              </xsl:for-each>
            </td>
          </tr>
          <xsl:if test="normalize-space(//NewFormURL) != ''">
            <tr>
              <td class="ms-addnew">
                <![CDATA[<img alt="" src="_layouts/images/rect.gif" />&nbsp;<a class="ms-addnew" href="]]><xsl:value-of select="//NewFormURL" /><![CDATA[">Ajouter une nouvelle annonce</a>]]>
              </td>
            </tr>
          </xsl:if>
        </table>
      </xsl:when>
      <!-- Titre et corps (Sans date) -->
      <xsl:when test="//DisplayStyle = '5'">
        <table width="100%" border="0" cellspacing="0" cellpadding="0" summary="Webpart VIDEO">
          <tr>
            <td style="padding:10px">
              <xsl:for-each select="xml/rs:data/z:row">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td>
					  <xsl:if test="current()/@ows_Surtitre">
						<br />
					  </xsl:if>
                      <span style="text-transform:uppercase;color:#4f4f4f;font-weight:bold">
                        <xsl:value-of select="current()/@ows_Surtitre" />
                      </span>
					  <xsl:if test="current()/@ows_Surtitre">
						<br />
					  </xsl:if>
                      <xsl:choose>
                        <xsl:when test="normalize-space(Avanade:FormatLink(current()/@ows_Lien_x0020_vers_x0020_autre_x002)) != ''">
                          <a style="font-size:11px;font-weight:bold">
                              <xsl:attribute name="href">
                                <xsl:value-of select="Avanade:FormatLink(current()/@ows_Lien_x0020_vers_x0020_autre_x002)" />
                              </xsl:attribute>
                            <span style="color:#F21E8C">
                              <xsl:value-of select="current()/@ows_Title" />
                            </span>
                          </a>
                        </xsl:when>
                        <xsl:when test="normalize-space(//BaseUrl) != ''">
                          <a style="font-size:11px;font-weight:bold">
                            <xsl:attribute name="href">
                              <xsl:value-of select="//BaseUrl" />
                              <xsl:value-of select="current()/@ows_ID" />
                            </xsl:attribute>
                            <span style="color:#F21E8C">
                              <xsl:value-of select="current()/@ows_Title" />
                            </span>
                          </a>
                        </xsl:when>
                        <xsl:otherwise>
						  <xsl:if test="current()/@ows_Title">
							  <span style="font-size:11px;font-weight:bold;color:#F21E8C">
								<xsl:value-of select="current()/@ows_Title" />
							  </span>
						  </xsl:if>
                        </xsl:otherwise>
                      </xsl:choose>
					  <xsl:if test="current()/@ows_Title">
						  <br/>
						  <br/>
					  </xsl:if>
                      <div style="clear:both;vertical-align:top">
                        <xsl:if test="normalize-space(translate(current()/@ows_Photo, ',', '')) != ''">
                          <div style="float:left;padding-right:10px">
                            <a>
                              <xsl:if test="normalize-space(//BaseUrl) != ''">
                                <xsl:attribute name="href">
                                  <xsl:value-of select="//BaseUrl" />
                                  <xsl:value-of select="current()/@ows_ID" />
                                </xsl:attribute>
                              </xsl:if>
                              <img style="border:solid 1px #fce4ee;">
                                <xsl:attribute name="src">
                                  <xsl:value-of select="Avanade:FormatLink(current()/@ows_Photo)" />
                                </xsl:attribute>
                              </img>
                            </a>
                          </div>
                        </xsl:if>
                          <div>
                            <xsl:value-of select="current()/@ows_Body" />
                          </div>
                      </div>
                    </td>
                  </tr>
                  <tr>
                    <td style="height:1px;background-color:#fce4ee;"></td>
                  </tr>
                  <tr>
                    <td style="height:7px;background-color:#ffffff;"></td>
                  </tr>
                </table>
              </xsl:for-each>
            </td>
          </tr>
          <xsl:if test="normalize-space(//NewFormURL) != ''">
            <tr>
              <td class="ms-addnew">
                <![CDATA[<img alt="" src="_layouts/images/rect.gif" />&nbsp;<a class="ms-addnew" href="]]><xsl:value-of select="//NewFormURL" /><![CDATA[">Ajouter une nouvelle annonce</a>]]>
              </td>
            </tr>
          </xsl:if>
        </table>
      </xsl:when>
      <!-- Photo et chapeau -->
      <xsl:when test="//DisplayStyle = '6'">
        <table width="100%" border="0" cellspacing="0" cellpadding="0" summary="Webpart ANNONCE">
          <tr>
            <td style="padding:10px">
              <xsl:for-each select="xml/rs:data/z:row">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td>
                      <br/>
                      <div style="clear:both;vertical-align:top">
                        <xsl:if test="normalize-space(translate(current()/@ows_Photo, ',', '')) != ''">
                          <div style="float:left;padding-right:10px">
                            <img style="border: solid 1px #fce4ee;">
                              <xsl:attribute name="src">
                                <xsl:value-of select="Avanade:FormatLink(current()/@ows_Photo)" />
                              </xsl:attribute>
                            </img>
                          </div>
                        </xsl:if>
                          <div>
                            <xsl:value-of select="Avanade:FormatBody(current()/@ows_Chapeau)" />
                          </div>
                      </div>
                    </td>
                  </tr>
                  <tr>
                    <td style="height:1px;background-color:#fce4ee;"></td>
                  </tr>
                </table>
              </xsl:for-each>
            </td>
          </tr>
          <xsl:if test="normalize-space(//NewFormURL) != ''">
            <tr>
              <td class="ms-addnew">
                <![CDATA[<img alt="" src="_layouts/images/rect.gif" />&nbsp;<a class="ms-addnew" href="]]><xsl:value-of select="//NewFormURL" /><![CDATA[">Ajouter une nouvelle annonce</a>]]>
              </td>
            </tr>
          </xsl:if>
        </table>
      </xsl:when>
      <!-- Corps -->
      <xsl:when test="//DisplayStyle = '7'">
        <table width="100%" border="0" cellspacing="0" cellpadding="0" summary="Webpart VIDEO">
          <tr>
            <td style="padding:10px">
              <xsl:for-each select="xml/rs:data/z:row">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td>
                      <br/>
                      <div style="clear:both;vertical-align:top">
                        <xsl:if test="normalize-space(translate(current()/@ows_Photo, ',', '')) != ''">
                          <div style="float:left;padding-right:10px">
                            <a>
                              <xsl:if test="normalize-space(//BaseUrl) != ''">
                                <xsl:attribute name="href">
                                  <xsl:value-of select="//BaseUrl" />
                                  <xsl:value-of select="current()/@ows_ID" />
                                </xsl:attribute>
                              </xsl:if>
                              <img style="border:solid 1px #fce4ee;">
                                <xsl:attribute name="src">
                                  <xsl:value-of select="Avanade:FormatLink(current()/@ows_Photo)" />
                                </xsl:attribute>
                              </img>
                            </a>
                          </div>
                        </xsl:if>
                          <div>
                            <xsl:value-of select="current()/@ows_Body" />
                          </div>
                      </div>
                    </td>
                  </tr>
                  <tr>
                    <td style="height:1px;background-color:#fce4ee;"></td>
                  </tr>
                </table>
              </xsl:for-each>
            </td>
          </tr>
          <xsl:if test="normalize-space(//NewFormURL) != ''">
            <tr>
              <td class="ms-addnew">
                <![CDATA[<img alt="" src="_layouts/images/rect.gif" />&nbsp;<a class="ms-addnew" href="]]><xsl:value-of select="//NewFormURL" /><![CDATA[">Ajouter une nouvelle annonce</a>]]>
              </td>
            </tr>
          </xsl:if>
        </table>
      </xsl:when>
      <!-- Volet de visualisation -->
      <xsl:when test="//DisplayStyle = '8'">
        <table width="100%" border="0" cellspacing="0" cellpadding="0" summary="Webpart ANNONCE">
          <tr>
            <td style="background-color:#ffffff;width:20%;vertical-align:top;height:0%;padding-top:10px;padding-right:10px;font-size:10px;border-right:solid 1px #88c917">
              <script type="text/javascript">
                function showPreviewVP(o)
                {
                  f = document.getElementById('previewPane');
                  f.innerHTML =  unescapeProperly(o.getAttribute('Preview'))+'&amp;nbsp;';
                }
              </script>
              <ul>
                <xsl:for-each select="xml/rs:data/z:row">
                  <li type="square" style="color:#4f4f4f">
                    <span style="text-transform:uppercase;color:#4f4f4f;font-weight:bold">
                      <xsl:value-of select="current()/@ows_Surtitre" />
                    </span>
                    <br />
                    <a style="font-size:11px;font-weight:bold" onmouseover="showPreviewVP(this);" onfocus="showPreviewVP(this);">
                      <xsl:if test="normalize-space(//BaseUrl) != ''">
                        <xsl:attribute name="href">
                          <xsl:value-of select="//BaseUrl" />
                          <xsl:value-of select="current()/@ows_ID" />
                        </xsl:attribute>
                      </xsl:if>
                      <xsl:attribute name="Preview">
                        <xsl:value-of select="current()/@ows_Preview" />
                      </xsl:attribute>
                      <span style="color:#F21E8C">
                        <xsl:value-of select="current()/@ows_Title" />
                      </span>
                    </a>
                    <span style="color:gray;font-size:8px;font-weight:bold">
                      (<xsl:value-of select="Avanade:FormatDate(current()/@ows_Created)" />)
                    </span>
                    <br />
                  </li>
                  <br />
                </xsl:for-each>
              </ul>
            </td>
            <td id="previewPane" style="background-color:#ffffff;width:80%;vertical-align:top;height:0%;padding-top:10px;padding-right:10px;font-size:10px;border-left:solid 1px #88c917"></td>
          </tr>
        </table>
      </xsl:when>
      <!-- Titre, surtitre et vignette -->
      <xsl:when test="//DisplayStyle = '9'">
        <table width="100%" border="0" cellspacing="1" cellpadding="1" summary="Webpart ANNONCE">
          <xsl:for-each select="xml/rs:data/z:row">
			<tr>
				<td valign="top" width="2%">
				  <xsl:if test="normalize-space(translate(current()/@ows_Photo, ',', '')) != ''">
					<div style="float:left;padding-right:10px">
					  <img style="border: solid 1px #fce4ee;">
						<xsl:attribute name="src">
						  <xsl:value-of select="Avanade:FormatLink(current()/@ows_Photo)" />
						</xsl:attribute>
					  </img>
					</div>
				  </xsl:if>
				</td>
				<td style="background-color:#ffffff;width:98%;vertical-align:top;height:0%;padding-top:5px;padding-right:5px;font-size:10px">
					<span style="text-transform:uppercase;color:#4f4f4f;font-weight:bold">
					  <xsl:value-of select="current()/@ows_Surtitre" />
					</span>
					<br />
					<a style="font-size:11px;font-weight:bold">
					  <xsl:if test="normalize-space(//BaseUrl) != ''">
						<xsl:attribute name="href">
						  <xsl:value-of select="//BaseUrl" />
						  <xsl:value-of select="current()/@ows_ID" />
						</xsl:attribute>
					  </xsl:if>
					  <span style="color:#F21E8C">
						<xsl:value-of select="current()/@ows_Title" />
					  </span>
					</a>
					<span style="color:gray;font-size:8px;font-weight:bold">
					  (<xsl:value-of select="Avanade:FormatDate(current()/@ows_Created)" />)
					</span>
					<br />
				  <br />
				</td>
			</tr>
		  </xsl:for-each>
          <xsl:if test="normalize-space(//NewFormURL) != ''">
            <tr>
              <td class="ms-addnew" colspan="2">
                <![CDATA[<img alt="" src="_layouts/images/rect.gif" />&nbsp;<a class="ms-addnew" href="]]><xsl:value-of select="//NewFormURL" /><![CDATA[">Ajouter une nouvelle annonce</a>]]>
              </td>
            </tr>
          </xsl:if>
        </table>
      </xsl:when>
      <!-- Titre, surtitre et vignette (sans date) -->
      <xsl:when test="//DisplayStyle = '10'">
        <table width="100%" border="0" cellspacing="1" cellpadding="1" summary="Webpart ANNONCE">
          <xsl:for-each select="xml/rs:data/z:row">
			<tr>
				<td valign="top" width="2%">
				  <xsl:if test="normalize-space(translate(current()/@ows_Photo, ',', '')) != ''">
					<div style="float:left;padding-right:10px">
					  <img style="border: solid 1px #fce4ee;">
						<xsl:attribute name="src">
						  <xsl:value-of select="Avanade:FormatLink(current()/@ows_Photo)" />
						</xsl:attribute>
					  </img>
					</div>
				  </xsl:if>
				</td>
				<td style="background-color:#ffffff;width:98%;vertical-align:top;height:0%;padding-top:5px;padding-right:5px;font-size:10px">
					<span style="text-transform:uppercase;color:#4f4f4f;font-weight:bold">
					  <xsl:value-of select="current()/@ows_Surtitre" />
					</span>
					<br />
					<a style="font-size:11px;font-weight:bold">
					  <xsl:if test="normalize-space(//BaseUrl) != ''">
						<xsl:attribute name="href">
						  <xsl:value-of select="//BaseUrl" />
						  <xsl:value-of select="current()/@ows_ID" />
						</xsl:attribute>
					  </xsl:if>
					  <span style="color:#F21E8C">
						<xsl:value-of select="current()/@ows_Title" />
					  </span>
					</a>
				  <br />
				</td>
			</tr>
		  </xsl:for-each>
          <xsl:if test="normalize-space(//NewFormURL) != ''">
            <tr>
              <td class="ms-addnew" colspan="2">
                <![CDATA[<img alt="" src="_layouts/images/rect.gif" />&nbsp;<a class="ms-addnew" href="]]><xsl:value-of select="//NewFormURL" /><![CDATA[">Ajouter une nouvelle annonce</a>]]>
              </td>
            </tr>
          </xsl:if>
        </table>
      </xsl:when>
    </xsl:choose>
  </xsl:template>
</xsl:stylesheet>